<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>青峰站群后台管理系统</title>
    <link href="/static/css/login.css" rel="stylesheet" rev="stylesheet" type="text/css" media="all" />
    <link href="/static/css/demo.css" rel="stylesheet" rev="stylesheet" type="text/css" media="all" />
    <script type="text/javascript" src="/static/js/jquery1.42.min.js"></script>
    <script type="text/javascript" src="/static/js/jquery.SuperSlide.js"></script>
    <script type="text/javascript" src="/static/js/Validform_v5.3.2_min.js"></script>

    <script type="text/javascript">
           var a="";
           function checkCode() {
               var code = $("#yzm").val();
               if(code =='' || code == null || code ==undefined){
                   $("#error").text("验证码不能为空");
                   return;
               }else {
                   if (code !=null){
                       $.ajax({
                           type: "POST",
                           url: '/base/checkCode.shtml?code=' + code,
                           //data:{code:code},// 你的formid
                           dataType: "json",
                           success: function (data) {
                               if (data) {
                                   a=true;
                                   $("#error").text("验证码正确");
                                   return a;
                               } else {
                                   a=false;
                                   $("#error").text("验证码错误");
                                   return false;
                               }
                           }
                       })
                   }
               }


           }

           function  onSubmit() {
               var username=$("#username").val();
               var password=$("#password").val();
               var code=$("#yzm").val();
               if(username =='' || username==null || username==undefined){
                   $("#error").text("用户名不能为空");
                   return;
               }else if(password =='' || password == null || password ==undefined) {
                   $("#error").text("密码不能为空");
                   return;
               }else if (code =='' || code == null || code ==undefined){
                   $("#error").text("验证码不能为空");
                   return;
               }else if (a==false){
                   $("#error").text("验证码验证错误");
                   return;
               }else {
                   $("#form").submit();
               }

           }
    </script>


</head>

<body>


<div class="header">
    <h1 class="headerLogo"><a title="青峰站群后台管理系统" target="_blank" href="#"></a></h1>
    <div class="headerNav">
    </div>
</div>

<div class="banner">

    <div class="login-aside">
        <div id="o-box-up"></div>
        <div id="o-box-down"  style="table-layout:fixed;">
            <div class="error-box" id="error"><#if msg??>${msg}</#if></div>

            <form class="registerform"action="/base/login.shtml" method="post" id="form">
                <div class="fm-item">
                    <label for="logonId" class="form-label">青峰系统登陆：</label>
                    <input type="text" name="username" id="username" class="i-text" >
                    <div class="ui-form-explain"></div>
                </div>
                <div class="fm-item">
                    <label for="logonId" class="form-label">登陆密码：</label>
                    <input type="password" maxlength="100" id="password" class="i-text" name="password">
                    <div class="ui-form-explain"></div>
                </div>

                <div class="fm-item pos-r">
                    <label for="logonId" class="form-label">验证码</label>
                    <input type="text" id="yzm" class="i-text yzm" onblur="checkCode()" >
                    <div class="ui-form-explain"><img src="/captcha.svl" class="yzm-img" onclick="this.src='/captcha.svl?d='+new Date()"/></div>
                </div>
                <div class="fm-item">
                    <label for="logonId" class="form-label"></label>
                    <input type="button" value="" tabindex="4" id="send-btn" class="btn-login" id="submit" onclick="onSubmit()">
                    <div class="ui-form-explain"></div>
                </div>

            </form>

        </div>

    </div>

    <div class="bd">
        <ul>
            <li style="background:url(/static/images/theme-pic1.jpg) #CCE1F3 center 0 no-repeat;"><a target="_blank" href="javascript:;"></a></li>
            <li style="background:url(/static/images/theme-pic2.jpg) #BCE0FF center 0 no-repeat;"><a target="_blank" href="javascript:;"></a></li>
        </ul>
    </div>

    <div class="hd"><ul></ul></div>
</div>
<script type="text/javascript">jQuery(".banner").slide({ titCell:".hd ul", mainCell:".bd ul", effect:"fold",  autoPlay:true, autoPage:true, trigger:"click" });</script>


<div class="banner-shadow"></div>

<div class="footer">
    <p>青峰软件 版权所有    Copyright 2016 QINGFENG Corporation, All Rights Reserved</p>
</div>
</body>
</html>
